package com.hawthorn.admin.feign.redisService;

import com.hawthorn.entity.po.SysRolePO;
import com.hawthorn.platform.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.FeignFallback;
import org.springframework.cloud.openfeign.HystrixFallbackFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>todo 角色同步redis feign服务</p>
 * @author: andy.ten@tom.com | xukaixing@hotmail.com
 * @created: 2022/8/1 15:08
 * @version v1.0.1
 * @copyright: Copyright (c)  andyten
 */
@FeignClient(name = "sentury-redis", contextId = "roleRedisClient", path = "/role", configuration = FeignConfig.class, fallbackFactory = HystrixFallbackFactory.class)
public interface RedisRoleFeignService extends FeignFallback
{
  @PostMapping(value = "/updateRole")
  void updateRole(@RequestBody SysRolePO sysRolePO);

  @PutMapping(value = "/saveRole")
  void saveRole(@RequestBody SysRolePO sysRolePO);
}
